<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/basproject/basicdata/Bas_Customer.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/basproject/basicdata/Bas_Customer.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name:'Bas_Customer',
        setup() {
            const table = ref({
                key: "CustomerId",
                footer: "Foots",
                cnName: "客户管理",
                name: "basicdata/Bas_Customer",
                newTabEdit: false,
                url: "/Bas_Customer/",
                sortName: "CustomerId"
            });
            const editFormFields = ref({"CustomerCode":"","CustomerName":"","CustomerFullName":"","CustomerType":"","ContactName":"","TelNo":"","Email":"","Principal":"","FaxNo":"","SalesOwner":"","Country":"","Area":"","Province":"","City":"","DetailAddress":"","DetailAddressEN":"","Remarks":""});
            const editFormOptions = ref([[{"title":"客户编码","required":true,"field":"CustomerCode"},
                               {"title":"客户简称","required":true,"field":"CustomerName"}],
                              [{"title":"客户全称","field":"CustomerFullName"},
                               {"title":"客户类型","field":"CustomerType"}],
                              [{"title":"联系人","field":"ContactName"},
                               {"title":"联系电话","field":"TelNo","type":"phone"}],
                              [{"title":"电子邮件","field":"Email","type":"mail"},
                               {"title":"负责人","field":"Principal"}],
                              [{"title":"传真","field":"FaxNo"},
                               {"title":"销售负责人","field":"SalesOwner"}],
                              [{"title":"所属国家","field":"Country"},
                               {"title":"所属地区","field":"Area"}],
                              [{"title":"省","field":"Province"},
                               {"title":"市","field":"City"}],
                              [{"title":"中文联系地址","field":"DetailAddress"},
                               {"title":"英文联系地址","field":"DetailAddressEN"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"CustomerCode":"","CustomerName":"","CustomerFullName":"","CustomerType":""});
            const searchFormOptions = ref([[{"title":"客户编码","field":"CustomerCode","type":"like"},{"title":"客户简称","field":"CustomerName","type":"like"},{"title":"客户全称","field":"CustomerFullName","type":"like"},{"title":"客户类型","field":"CustomerType"}]]);
            const columns = ref([{field:"CustomerId",title:"客户ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CustomerCode",title:"客户编码",type:"string",link:true,width:110,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CustomerName",title:"客户简称",type:"string",width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CustomerFullName",title:"客户全称",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"CustomerType",title:"客户类型",type:"string",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ContactName",title:"联系人",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"TelNo",title:"联系电话",type:"string",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Email",title:"电子邮件",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"Principal",title:"负责人",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"FaxNo",title:"传真",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"SalesOwner",title:"销售负责人",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"Country",title:"所属国家",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"Area",title:"所属地区",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"Province",title:"省",type:"string",width:180,showOverflowTooltip:true,align:"left"},
                       {field:"City",title:"市",type:"string",width:180,showOverflowTooltip:true,align:"left"},
                       {field:"DetailAddress",title:"中文联系地址",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"DetailAddressEN",title:"英文联系地址",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
